package com.erp.programmer.dto;

import com.erp.programmer.annotation.ValidateEntity;
import com.erp.programmer.domain.Product;

import java.math.BigDecimal;

public class PurchaseOrderDetailDto {
    /**
     * 采购详细的流水号
     */
    private String id;

    /**
     * 该采购详细所对应的采购订单
     */
    private String purchaseId;

    /**
     * 商品id
     */
    @ValidateEntity(required=true,requiredMaxLength=true,requiredMinLength=true,maxLength=19,minLength=19,errorRequiredMsg="商品ID不能为空！",errorMaxLengthMsg="商品ID不能大于19！",errorMinLengthMsg="商品ID长度不能小于19！")
    private String productId;
    /**
     * 商品信息
     */
    private Product product;
    /**
     * 采购了多少该商品（商品数量）
     */
    private String number;

    /**
     * 该详细对应的商品总价
     */
    private BigDecimal totalPrice;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getPurchaseId() {
        return purchaseId;
    }

    public void setPurchaseId(String purchaseId) {
        this.purchaseId = purchaseId;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public BigDecimal getTotalPrice() {
        return totalPrice;
    }

    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

    public void setTotalPrice(BigDecimal totalPrice) {
        this.totalPrice = totalPrice;
    }
}
